/**
 * Operate 业务逻辑实现类
 * @author yanwl
 * @date 2015-01-29
 */
package com.chnbst.bstyun.service.impl;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.chnbst.bstyun.core.base.BaseService;
import com.chnbst.bstyun.core.common.helper.DaoHelper;
import com.chnbst.bstyun.model.pojo.Operate;
import com.chnbst.bstyun.service.OperateService;

@Transactional
@Service
public class OperateServiceImpl extends BaseService implements OperateService {
	
	//声明命名空间
	private final static String nameSpace = "com.chnbst.bstyun.mapper.OperateMapper";

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean insertOperate(Operate operate) {
		return DaoHelper.insert(nameSpace, "insertOperate", operate);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean deleteOperate(Integer operateId) {
		return DaoHelper.delete(nameSpace, "deleteOperate", operateId);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean updateOperate(Operate operate) {
		return DaoHelper.update(nameSpace, "updateOperate", operate);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=true)
	@Override
	public Operate selectByOperateUrl(String operateUrl) {
		return (Operate)DaoHelper.query(nameSpace, "selectByOperateUrl", operateUrl);
	}
}
